﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<FriendTest.Media.MusicInfo>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	MusicIndex
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>所有音乐</h2>
    <%=Html.ValidationSummary("添加资源失败！") %>
   <%using (Html.BeginForm("AddMusic")) 
       {%>
       <%if (ViewData["Login"] == "true") %>
       <% {%>
       <div>
             <label>SubjectID:</label>
            <%=Html.TextArea("SubjectIDInput", new { rows = 1, cols = 30 })%>
            <%=Html.ValidationMessage("SubjectIDInput", "*")%>
            <input type="submit" value="添加资源" />
        </div>
        <% }%>
       <%} %>
    
    <%foreach (var items in Model){ %>
    <div class="myMovie">

    <table width="100%" height="325" border="0">
          <tr>
            <th width="34%" height="321" scope="col">
                <img src="<%=Html.Encode(items.imageURL) %>" alt="<%= Html.Encode(items.title)%>  width="250" height="250""/>
            </th>
            <th width="66%" scope="col"><table width="100%" height="195" border="0">
              <tr>
                <th height="29" scope="col">
                <h4><%= Html.ActionLink(items.title, "MusicInfoDetails", new { items.ResourceID })%></h4>
                </th>
              </tr>
              <tr>
                <td>
                    <%= Html.Encode(items.author)%>/<%=Html.Encode(items.publisher) %>
                    <br/>
                    <%=Html.Encode(items.pubdate) %>
                    <br/>
                </td>
              </tr>
              <tr>
                <td height="94">
                <%= Html.Encode(items.ratingAverage)%>(<%= Html.Encode(items.numRaters)%>评价)
                </td>
              </tr>
            </table></th>
          </tr>
        </table>
            </div>
            <br/>
    
    <%} %>
    
    
    <%--<%=Html.ActionLink("<<前一页","BookIndex",new{page=(int)ViewData["page"]-1} %>|
    <%=Html.ActionLink("后一页>>","BookIndex",new{page=(int)ViewData["page"]+1} %>--%>
    


</asp:Content>

